'''
Created on 2013-7-1

@author: Administrator
'''
def cmd(cmd):
    import subprocess;
    tmp = subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
    rtn = {}
    rtn['error'] =  tmp.stderr.readlines()
    rtn['out'] =  tmp.stdout.readlines()
    return rtn;
def cmd2(cmd):
    import subprocess;
    rtn = subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
#    print tmp.stdout.readlines()
#    print tmp.stderr.readlines()
    return rtn